How to create a new SQL job using SQL Server Management Studio?
How to create a new SQL job using SQL Server Management Studio?
10916-Jul-2024
Updated on 17-Jul-2024
Home / DeveloperSection / Forums / How to create a new SQL job using SQL Server Management Studio?
How to create a new SQL job using SQL Server Management Studio?
Ashutosh Kumar Verma
17-Jul-2024SQL Server Job
There are several steps to create a new SQL Server job using SQL Server Management Studio (SSMS).
Here is a detailed guide to help you through the process.
Open the SQL Server Workstation (SSMS)
Start SQL Server Management Studio.
Connect to the SQL Server instance where you want to create the job.
Access SQL Server Agent
In the Object Explorer pane, locate the SQL Server Agent. If it is not expanded, click the plus (+) sign next to it.
Verify that SQL Server Agent is running. Otherwise, right-click the SQL Server Agent and select Start.
Create a New Job
Must read the Component of SQL Server Jobs before creating the new SQL Job,
Follow the given steps if you familiar with the components of SQL Job
Right-click Jobs under SQL Server Agent.
Select New Job... from the context menu. This will open the New Task window.
General Tab
As you can see, it has several steps, so let's go one by one. First, provide the Job Name and Description and click “OK”.
Steps Tab
The name of the step is Steps and it has a name, type and select Rez and type a command to save it to any location, and click “OK”.
Schedules Tab
Now click on the “Schedule” tab and provide the name, type, and frequency and click on “OK”.
Alerts Tab
Now click on the Alerts tab and click on the “Add” button and provide the alert name, type, database name and click on “OK”.
Notifications Tab
Now click on the Notifications tab and choose what type of notifications you want.
Targets Tab
The last tab is the “Target” tab which shows you options for target servers, you can even select multiple target servers.
Save the Job
Once you have entered all the required properties, click OK in the New Task window to save the task.
Verify Job Creation
In Object Explorer, expand SQL Server Agent > Tasks.
Make sure your new job appears in the list.
Additional Tips
Testing- Once the job is created, you can test it by right-clicking on the job and selecting Start Job at Step... .
Monitoring- Use Job Activity Monitor under SQL Server Agent to monitor job status and performance history.
By following these steps, you can successfully create and manage SQL Server jobs using SQL Server Management Studio.
Also, Read: What is SQL server job, and why is it used?